<%@ page language="java" isELIgnored="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/ResourceGlobal.jsp"%>
<html>
<head>   
 <!-- 这里引入导航信息header.tpl -->
 <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="<%=context%>resources/modules/system/sys/post/post.create.js?r=<%=Math.random()%>"></script>
<title>修改${postVo.postTitle }岗位</title>
<script type="text/javascript">
var pagePath = '<%=context%>' +'sys/oper/post/';

var PATH_PREFIX ="";

function setPathPrefix(path){
	PATH_PREFIX = path;
}
//默认加载
$(function(){
	//把访问路径传到js
	setPathPrefix(pagePath);
});
</script>
</head>
<body class="sub-page">
	<form id="postAddForm" name="postAddForm" role="form"
		class="form-horizontal" method="post"
		action="">
		<div class="page-content">
			<div class="page-header">
				<h4 class="page-title">修改${postVo.postTitle }岗位</h4>
			</div>
			<input type="hidden" name="postId" id="postId" value="${postVo.postId}">
			
			<div class="page-body">
				<div class="table-responsive">
					<table class="table table-bordered">
						<tbody>
							<tr>
								<td>岗位名称<span style="color:red;">*</span></td>
								<td class="white-bg" colspan="3">
									<input type='text' class='form-control' size="70" name='postTitle' id='postTitle' placeholder="岗位名称" value="${postVo.postTitle }"  />
								</td>
					   		 </tr>
					   		 
					   		 <tr>
								<td>岗位代码<span style="color:red;">*</span></td>
								<td class="white-bg" colspan="3">
									<input type='text' class='form-control' size="70" name='postCode' id='postCode' placeholder="请输入英文" value="${postVo.postCode }"  />
								</td>
					   		 </tr>
					   		 
					   		 <tr>
								<td class="col-sm-4" >岗位层级</td>
								<td class="white-bg form-inner">
							    	<select class="form-control " placeholder="岗位层级" name="postRank" id="postRank">
										<option value=""></option>
										<wasp:dictOptions dctRootType="POST_RANK" initValue="${postVo.postRank }"></wasp:dictOptions>
									</select>
								</td>
								
								<td >是否可在岗位页面配置<span style="color:red;">*</span></td>
									<td class="white-bg form-inner">
										<select name="isConf" id="isConf" placeholder="是否可在页面配置" onchange="$(this).valid && $(this).valid();" class='form-control'>
											<option value=""></option>
											<option value="Y" <c:if test="${postVo.isConf eq 'Y' }">selected="selected"</c:if>>是</option>
											<option value="N" <c:if test="${postVo.isConf eq 'N' }">selected="selected"</c:if>>否</option>
										</select>
									</td> 
								 </td>
								
							  </tr>
							  
							   <tr>
								<td >内部/外部岗位<span style="color:red;">*</span></td>
								<td class="white-bg form-inner" colspan="3">
									<select name="property" id="property"  placeholder="岗位属性" onchange="propertyChange(this);" class='form-control'>
										<option value=""></option>
										<option value="INNER" <c:if test="${postVo.property eq 'INNER' }">selected="selected"</c:if>>内部</option>
										<option value="OUT"   <c:if test="${postVo.property eq 'OUT' }">selected="selected"</c:if>>外部</option>
									</select>
								</td>
							  </tr>
							  
							  <tr id="post_anthority" style="display:none">
								<td >是否根据岗位人员赋权<span style="color:red;">*</span>
									<a tabindex="0" role="button" data-toggle="popover" data-trigger="hover" data-container="body" data-content="若为是，则会根据岗位上所选人员查询数据角色进行赋权；若为否，则只用作记录岗位人员信息" data-placement="right" class="fa fa-exclamation-circle fa-lg text-info"></a>
								</td>
									<td class="white-bg form-inner">
										<select name="isAuth" id="isAuth"  placeholder="是否根据岗位人员赋权"  onchange="$(this).valid && $(this).valid();" class='form-control'>
											<option value=""></option>
											<option value="Y" <c:if test="${postVo.isAuth eq 'Y' }">selected="selected"</c:if>>是</option>
											<option value="N" <c:if test="${postVo.isAuth eq 'N' }">selected="selected"</c:if>>否</option>
										</select>
									</td> 
								 </td> 
								
								<td >岗位数据权限类型<span style="color:red;">*</span>
									<a tabindex="0" role="button" data-toggle="popover" data-trigger="hover" data-container="body" data-content="公司类型的岗位用作跨部门的数据角色赋权" data-placement="right" class="fa fa-exclamation-circle fa-lg text-info"></a>
								</td>
									<td class="white-bg form-inner">
										<select name="authority" id="authority" placeholder="数据权限类型" onchange="$(this).valid && $(this).valid();" class='form-control'>
											<option value=""></option>
											<option value="COMP" <c:if test="${postVo.authority eq 'COMP' }">selected="selected"</c:if>>公司</option>
											<option value="DEPT" <c:if test="${postVo.authority eq 'DEPT' }">selected="selected"</c:if>>部门</option>
										</select>
									</td> 
								 </td> 
							  </tr>
							  
							 
							  
							  <tr>
							  	<td>备注</td>
							  	<td class="white-bg form-inner" colspan="3">
				                	<div >
				                    	<textarea name="remark" id="remark" class="form-control" rows="3" >${postVo.remark}</textarea>
				                	</div>
							  	</td>
							  </tr>
							  
						</tbody>
					 </table>
				</div>
			</div>
			
			
			<div class="page-footer">
				<button type="button" id="btnSubmit" name="btnSubmit"
					class="btn btn-primary btn-save btn-loading btn-w-xs"
					data-loading-text="<i class='ico-loading'></i>"
					onclick="submitAddForm();">提交</button>
				<button type="button" id="btnCancle" name="btnCancle" class="btn btn-link btn-w-xs"
					onclick="window.close();">取消</button>
			</div>
		</div>
</form>
</body>
</html>